#pragma once
#include "GameDefine.h"
class Bullet;
#include <list>
#include <queue>
#include "Object.h"
using namespace std;
class BulletManager;
class BulletManager
{
private:		
	queue<Bullet*> _remain;			
	queue<Bullet*> _remainF;	
	Bullet* bulletL;
	list<Bullet*> _using;
	//lay ra mot vien dan
	Bullet* getBullet(BULLET_ID id);
	//kiem tra so luong dan con lai
	int getRemain(BULLET_ID id);
	//them mot vien dan vao pool
	void addBullet(Bullet* bullet);
public:
	static BulletManager* _ins;
	static BulletManager* getInstance();
	static BulletManager* create();

	void collect(Bullet* bullet);			
	list<Bullet*> getUsingList();
	void shoot(BULLET_ID id,ObjectType parent, D3DXVECTOR2 start,float angle);	
	BulletManager(void);
	~BulletManager(void);
};

